Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material-experimental/mdc-select): float label on focus if there's a placeholder #22187

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

crisbeto
Copy link
Member

This is the equivalent of #19517 for the MDC-based select.

Historically we've only floated the mat-select label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's placeholder text that can be shown. This behavior is consistent with MatInput.

@crisbeto crisbeto added P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release labels Mar 11, 2021
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 11, 2021
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 11, 2021
Adds an exception for one missing test until angular#22187 is merged.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 11, 2021
Adds an exception for one missing test until angular#22187 is merged.
@crisbeto crisbeto force-pushed the mdc-select-float-labe branch from d9d5501 to 84250b0 Compare March 11, 2021 08:14
mmalerba pushed a commit that referenced this pull request Mar 11, 2021
Adds an exception for one missing test until #22187 is merged.
mmalerba pushed a commit that referenced this pull request Mar 11, 2021
Adds an exception for one missing test until #22187 is merged.
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Mar 11, 2021
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto force-pushed the mdc-select-float-labe branch from 84250b0 to 0517fd0 Compare March 12, 2021 07:02
@crisbeto crisbeto requested a review from a team as a code owner March 12, 2021 07:02
@josephperrott josephperrott removed the request for review from a team March 12, 2021 15:43
@andrewseguin andrewseguin added target: minor This PR is targeted for the next minor release target: patch This PR is targeted for the next patch release and removed target: patch This PR is targeted for the next patch release target: minor This PR is targeted for the next minor release labels Mar 19, 2021
@andrewseguin
Copy link
Contributor

Need rebase (passes global TAP)

…s a placeholder

This is the equivalent of angular#19517 for the MDC-based select.

Historically we've only floated the `mat-select` label if a value is selected or the panel is
open, because we wouldn't otherwise have anything to show. These changes make it so
that we also float it on focus, if there's `placeholder` text that can be shown. This behavior
is consistent with `MatInput`.
@crisbeto
Copy link
Member Author

Rebased.

@crisbeto crisbeto force-pushed the mdc-select-float-labe branch from 0517fd0 to 57025be Compare March 21, 2021 11:41
@andrewseguin andrewseguin merged commit b994349 into angular:master Mar 23, 2021
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants